package com.sl.au.service;

import java.util.List;
import java.util.Map;

import org.activiti.engine.runtime.ProcessInstance;

import com.sl.au.entity.QuoteForeign;
import com.sl.au.entity.QuoteReplacement;
import com.sl.au.entity.Quote;
import com.sl.au.entity.QuoteDevice;
import com.sl.au.repository.QuoteForeignRepository;
import com.sl.au.repository.QuoteReplacementRepository;
import com.sl.au.repository.QuoteDeviceRepository;

/**
 *外贸价格单
 */
public interface QuoteForeignService extends BaseService{
      QuoteForeignRepository getRepository();  
      QuoteDeviceRepository getDeviceRepository();
      QuoteReplacementRepository getReplacementRepository();
  
      
      /**生成外贸报价单
  	 * @param quoteId
  	 * @return 返回生成WORD文件全路径
  	 * @Author:Neil
  	 */
      public String genQuoteForeignDocx(String quoteForeignId);
  	
 /**
 *得到外贸价格单数据
 */
List<QuoteForeign> getQuoteForeign(int start, int length, Map<String,String> condition, String orderName, String dir);
/**
 * 得到外贸价格单数据条数
 * @param condition map参数有(key,dataFilter,superior,areaId,userId)
 * @return
 */
long getQuoteForeignCount(Map<String, String> condition);
/**
 * 根据quoteForeign得到价格单细目
 * @param quoteForeign 外贸价格单实体
 * @param isPump 设备类型（主机或其他）
 * @return
 */
List<QuoteDevice> getQuoteDevice(int start, int length, String quoteForeignId, String orderName, String dir);
/**
 * 得到当前设备明细
 * @param nowDataId 当前设备Id
 * @return
 */
List<QuoteDevice> getNowQuoteDevice(int start, int length, String nowDataId, String orderName,String dir);
/**
 * 得到其他
 * @param quoteForeignId 外贸价格单Id
 */
List<QuoteReplacement> getQuoteReplacement(int start, int length, String quoteForeignId, String orderName,String dir);


/**
 * 保存外贸报价单流程发起的信息
 * 
 * @param pInst
 */
public void saveProcessStart(String quoteForeignId, ProcessInstance pInst);

/**
 *获得一个部门
 *某一种审批状态的报价单 
 * @param key  查询条件
 */
List<QuoteForeign> getForeignQuoteInState(int start, int length, String key, String audit,String superior);

List<QuoteReplacement> getQuoteReplacementER(int start, int length, Map<String, String> condition, String orderName,
		String dir);

List<QuoteReplacement> getQuoteReplacementERprice(int start, int length, Map<String, String> condition,
		String orderName, String dir);


}
